﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FXnaAppBase;

using ASCore;

using DotSpatial.Data;

using FXnaInfrastructure;



namespace ASApplication
{
    [Serializable]
    public class Project:ProjectBase
    {


        public Project()
        {

            this._aSData = new ASData();

            this._modelData = new ModelData();


            //初始化一个网格

            //定义默认的坐标范围为 

            this.CommonData.WorkBoundary.LocalExtent = new Extent(-6000, -6000, 6000, 6000);


            //默认创建一个网格作为接受体

            FGrid fgrid = new FGrid(0, -6000, -6000, 25, 25, 12000, 12000);

            int index = this._aSData.GridLayer.IdGenerator.GetNextIndex();

            string id = "grid" + index.ToString();
            string desc = "网格" + index.ToString();

            GridReceptor grid = new GridReceptor(id, fgrid);

            grid.Desc = desc;

            this._aSData.GridLayer.AddShape(grid);


        }



        ASData _aSData;

        /// <summary>
        /// 对外输入的主数据
        /// </summary>
        public ASData ASData
        {
            get { return _aSData; }
           
        }

        ModelData _modelData;

        /// <summary>
        /// 用于计算的模型数据，包括输入，计算，输出多个接口，
        /// 现在只是进行简单的设计
        /// </summary>
        public ModelData ModelData
        {
            get { return _modelData; }
           
        }



    }
}
